package cn.zly.spring.beans.factory.config;

import cn.zly.spring.beans.factory.BeansException;

/**
 * @author zhanglianyong
 * @date 2025/1/21
 */
public interface BeanPostProcessor {

	/**
	 * 在Bean初始化之前执行
	 * @param bean 对象
	 * @param beanName bean名称
	 * @return bean
	 * @throws Exception
	 */
	Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException;

	/**
	 * 在Bean初始化之后执行
	 * @param bean bean
	 * @param beanName bean对象名称
	 * @return bean
	 * @throws Exception
	 */
	Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException;
}
